/*
 * @Description: 工作经验
 * @Author: fhw
 * @Date: 2023-02-06 11:50:26
 */
import { defineComponent, PropType } from 'vue'
import ExperienceImage from '@/assets/image/resume/experience-1.png'
import { map } from 'ramda'
import { ResumeExperience } from '@/interface/resume'

const props = {
	dataSource: {
		type: Array as PropType<ResumeExperience[]>,
		default: [],
	},
} as const
export default defineComponent({
	props,
	setup(props) {
		return () => (
			<div class="work-content" id="work-section">
				<div class="experience awards">
					<div class="main-title">
						<span class="icon">
							<img src={ExperienceImage} alt="" />
						</span>
						<span class="txt">工作经验</span>
					</div>

					<a-row>
						{map((item) => {
							return (
								<a-col span={12}>
									<div class="inner-box">
										<div class="date">
											<span>{item.date}</span>
										</div>
										<h5>{item.title}</h5>
										<div class="text">{item.text}</div>
									</div>
								</a-col>
							)
						}, props.dataSource ?? [])}
					</a-row>
				</div>
			</div>
		)
	},
})
